feat: enhance show current with generator ACL and interface filtering#507
Open
vaneuk wants to merge 2 commits intoannetutil:mainfrom
Open
feat: enhance show current with generator ACL and interface filtering#507vaneuk wants to merge 2 commits intoannetutil:mainfrom
vaneuk wants to merge 2 commits intoannetutil:mainfrom
Conversation
Add -g, -i, and --acl flags to `annet show current`: - Default behaviour unchanged: shows full device config - --acl: applies all generator ACLs to scope output to managed config - -g / -i: imply --acl, further scope output to specific generators or interfaces Remove old_raw and _gen_current_items (no remaining callers) and reuse existing old_new with no_new=True, eliminating duplicated fetch logic. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New flags
--acl-g <tag>--acl, limits output to generators matching the tag-i <iface>--acl, limits output to the specified interface(s)Example workflow
Generate desired config and fetch the matching slice of current config for a single interface:
Produce a patch (commands to apply) and a rollback (commands to revert):
Implementation notes
old_raw(used by the previousshow current) fetched config as raw text with no generator involvement. This PR replaces it withold_new(..., no_new=True), which runs the same fetch + ACL filtering pipeline already used byannet genandannet patch.